(function () {
    'use strict';

    angular.module('app').service('SysUserPassService', SysUserPassService);

    SysUserPassService.$inject = [
        'A',
        'Api'
    ];

    function SysUserPassService(A, Api) {

        var passService = {
            update: update,
            reset : reset
        };

        function update(old, pass, ik) {
            return A.Ajax.post(Api.sys.user.pass.update(ik), {
                old : old,
                pass: pass
            });
        }

        function reset(ik) {
            return A.Ajax.post(Api.sys.user.pass.reset(ik));
        }

        return passService;
    }
})();